package com.study.bootstudy.entity;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author RenPu
 * @Date 2023/10/11 16:24
 * @Version 1.0
 * @Description:
 **/

@Component
@Data
@PropertySource("classpath:p2.properties")   //指定路径加载，自定义名称配置文件
@ConfigurationProperties(prefix = "people2")
public class People2 {
    private String name;
    private String age;
    private String sex;
    private String isMeraed;
    private Friend friend;
    private String[] pets;
    private List<Friend> friends;


}
